package com.firemoss.atonement.example.contactmanager.view.model
{
	import com.firemoss.atonement.example.contactmanager.model.Company;
	
	import mx.collections.ArrayCollection;
	import mx.collections.ListCollectionView;
	import mx.collections.Sort;
	import mx.collections.SortField;

	[Bindable]
	public class ContactManagerPresentationModel
	{
		public function set currentCompany( value : Company ) : void
		{
			currentCompanyContacts.company = value
		}
		public function get currentCompany() : Company
		{
			return currentCompanyContacts.company
		}
		
		public var companies : ListCollectionView
		
		public var contacts : ArrayCollection
		
		public var currentCompanyContacts : ContactListCollectionView
		
		public var openContacts : ArrayCollection = new ArrayCollection()
		
		public function ContactManagerPresentationModel()
		{
			companies = new CompanyListCollectionView()
			contacts = new ArrayCollection()
			currentCompanyContacts = new ContactListCollectionView( contacts )
		}
		
	}
}